The problem is the "noNewDevice" flag. Since you're not using a new device,
it ignores the depth you specify and uses the depth of the main device. Try
it without "noNewDevice." It's okay to make an offscreen device. And you
shouldn't need to do anything else besides remember to dispose of it later.
That's one reason GWorlds/GDevices are nice.
- Graham
+++++++++++++++++++++++++++
>From Dave Howell <dshowell@worldnet.att.net>
Date: Thu, 30 Jan 1997 23:19:53 -0800
Organization: Pablo Media
Ian McCall sez:
>
> Hi.
Hi Ian.
> I have a colour picture, which I'd like to get down to mono. I
> believe I can do this by creating an offscreen 1-bit depth GWorld,
> then drawing my picture into it. Quickdraw should then take over
> and dither the picture accordingly, or at least so I believe.
>
> The trouble is, the picture doesn't seem to be getting dithered.
> When I dump it out as a PICT file, it still contains colour.
>
> Here's the code (the 'watermark' variables rather give away what the
> final aim is...):
>
> [code brutally snipped]
The trouble is that you're using DrawPicture to draw into your 1-bit
PixMap. DrawPicture doesn't dither. You need to tell DrawPicture to draw
into a nice 16-bit or 24-bit direct-color PixMap, and then call CopyBits
(don't forget to add the constant ditherCopy to your copy mode
parameter) to perform a dithered copy into your 1-bit PixMap.
Alternatively, if you can require QuickTime for your application, you
might call DrawTrimmedPicture, which accepts a Boolean doDither
parameter.
Dave
---------------------------
>From David Snowdon <snowdon@ozemail.com.au>
Subject: 3D Info?
Date: Thu, 30 Jan 1997 18:58:00 +1000
Organization: Concussive Software
Hi,
I am looking to start in 3D programming (with a view to eventually
making some cool games). I definitely want a true 3D environment...
Could someone please tell me what the best books to get are? The black
art of mac game programming is one name that has some up... What
should I get? I don't exactly have that much money to spend on books,
so what should I and what do I have to get?
Dave.
+++++++++++++++++++++++++++
>From kefka@astral.magic.ca (Dan Posluns)
Date: Sun, 02 Feb 1997 19:49:17 -0400
Organization: TotalNet Inc.
In article <32F06298.F03@ozemail.com.au>, snowdon@ozemail.com.au wrote:
> Hi,
>
> I am looking to start in 3D programming (with a view to eventually
> making some cool games). I definitely want a true 3D environment...
> Could someone please tell me what the best books to get are? The black
> art of mac game programming is one name that has some up... What
> should I get? I don't exactly have that much money to spend on books,
> so what should I and what do I have to get?
>
> Dave.
Black Art is probably your best place to start if you want to do true 3-D
as opposed to the more limited versions imposed on the Maradoom Forces
genre, since that is the main focus of the entire book. Tricks of the Mac
Game Programming Gurus also has a pretty indepth section on QuickDraw 3D,
but having the limited computational resources that I do (680LC40) I
haven't really bothered to read through it. Still, there might be some
good stuff there.
Good luck,
Dan.
--
Dan Posluns - kefka@astral.magic.ca, http://www.magic.ca/~kefka/domain.html
"What's the most important thing in life? To be free of obligations! Otherwise you lose the ability to gamble..." - Setzer, FF3
"Play with fire and you get burned." - Magus, Chrono Trigger
"I don't believe there are any bad people in this world. Just bad hearts and weak people. It's difficult for weak people to become strong. That's why we have to get rid of the bad hearts. Please understand." - Jean, Breath of Fire 2
+++++++++++++++++++++++++++
>From online@mactech.com (nick.c MacTech)
Date: Tue, 04 Feb 1997 00:04:03 -0800
Organization: MacTech Magazine
snowdon@ozemail.com.au wrote:
>I am looking to start in 3D programming (with a view to eventually
>making some cool games). I definitely want a true 3D environment...
>Could someone please tell me what the best books to get are?
Two books that you might find useful are:
_Engines of Creation_ by Jonathan Blossom
ISBN 1-878739-90-5
_Fast Algorithms for 3-D Graphics_ by Georg Glaeser
ISBN 0-387-84288-2
Engines has a nice, gradual paced tutorial on basic
3D programming that leads from the very basic mathematics
of projection and graphics worlds, up through wireframes,
polygon rendering, clipping, shading, and inline performance
optimization for the mac.
Glaeser, has some great code including reflections, depth
buffering, complex objects, shadows, etc. The code is